package com.blog.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.blog.entity.Category;

import java.util.List;

public interface CategoryService extends IService<Category> {
    Category createCategory(Category category);
    
    Category updateCategory(Category category);
    
    void deleteCategory(Long id);
    
    Category findById(Long id);
    
    List<Category> findAll();
    
    IPage<Category> findAll(Page<Category> page);
    
    boolean hasArticles(Long categoryId);
    
    long getCategoryCount();
} 